stack
Type
object
Summary
The basic LiveCode object: a window.
Syntax
stack
Description
Use the stack object type to display a window, palette, or dialog box.
A stack corresponds to a single window. Each LiveCode file contains one or more stacks. The first stack in a stack file is called the main stack; any other stacks in the stack file are called substacks of the main stack.
Stacks contain one or more cards, and may optionally contain backgrounds.
The type of window a stack is displayed in depends on the stack's style property and whether the stack was opened with the go, topLevel, palette, modal, or modeless command.
Examples
go to stack "Help"
put the short name of stack 3 after field "Stacks List"
Related
command: topLevel, go, modal, palette, modeless
function: revLoadedStacks, mouseStack
glossary: stack version, object, property, dialog box, command, object type
keyword: templateStack
object: stack
property: mode, defaultStack, style
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile
Associated Syntax
Function
Name | Summary | Syntax |
---|---|---|
mobileAdGetTopLeft | Returns the topLeft position of an ad. | mobileAdGetTopLeft (<adName>) |
mobileAdGetVisible | Return true if an ad is visible. | mobileAdGetVisible(<ad>) |
iphoneReachabilityTarget | Returns the server currently being monitored | iphoneReachabilityTarget |
mobileAds | Return a list of all mobile ads that have been created. | mobileAds() |
Message
Name | Summary | Syntax |
---|---|---|
mobileStandaloneSaved | Sent to the mainstack after it has been saved as a mobile standalone application or the simulation was started. | mobileStandaloneSaved <pTargetType>, <pAppBundle> |
socketError | Sent when an error occurs on a socket that causes the socket to close or to fail to open. | socketError <pSocketID>, <pErrorString> |
mouseWithin | Sent periodically to an object while the mouse pointer is within its borders. | mouseWithin |
reloadStack | Sent to a main stack when the user tries to open a main stack with the same name as a previously-opened stack. | reloadStack <pStackName>, <pFileName> |
startup | Sent to the first card opened when the application starts up. | startup <pMode> |
errorDialog | Sent to an object when one of its handlers cannot be run due to an execution error. | errorDialog <pExecutionError>, <pParseError> |
savingMobileStandalone | Sent to the mainstack when a mobile standalone application is being saved or the simulation is started. | savingMobileStandalone <pTargetType>, <pAppBundle> |
pushNotificationRegistrationError | Sent when the application fails to register to receive Push Notifications form a Push Notification Server. | pushNotificationRegistrationError <pErrorMessage> |
nameChanged | Sent to an object when its name is changed. | nameChanged <pOldName>, <pNewName> |
releaseStack | Sent to a stack when the stack is removed from the message path with the stop using command. | releaseStack |
mainStackChanged | Sent to a stack when its mainStack is changed. | mainStackChanged |
socketTimeout | Sent when an open socket, read from socket or write to socket command halts for the time specified by the socketTimeoutInterval property. | socketTimeout <pSocketID> |
savingStandalone | Sent to the mainstack when a standalone application is being saved. | savingStandalone |
relaunch | After having launched an application, upon launching a successive instance the LiveCode engine will send a relaunch message to the first stack of the application. | relaunch <pCommandLineArguments> |
selectedObjectChanged | Sent to an object when it is selected. | selectedObjectChanged |
standaloneSaved | Sent to the mainstack after it has been saved as a standalone application. | standaloneSaved <pFolderSavedIn> |
mouseRelease | Sent when the user releases the mouse outside the control that was clicked. | mouseRelease <pButtonNumber> |
mouseDown | Sent when the user presses the mouse button. | mouseDown <pButtonNumber> |
pushNotificationReceived | Sent when the application receives a push notification from a Push Notification Server. | pushNotificationReceived <pMessage> |
pushNotificationRegistered | Sent when the application registers to receive Push Notifications form a Push Notification Server. | pushNotificationRegistered <pSignature> |
reachabilityChanged | Sent when the network connectivity to a monitored server changes. | reachabilityChanged <pHostNameOrAddress>, <pReachabilityInfo> |
mouseEnter | Sent when the mouse pointer moves into an object. | mouseEnter |
mouseUp | Sent when the user releases the mouse button. | mouseUp <pButtonNumber> |
mouseStillDown | Sent periodically while the mouse button is being held down. | mouseStillDown <pButtonNumber> |
libraryStack | Sent to a stack when it is placed in the message path by the start using command. | libraryStack |
mouseMove | Sent when the user moves the mouse. | mouseMove <pNewMouseH>, <pNewMouseV> |
localNotificationReceived | Sent when the application receives a local notification from the operating system. | localNotificationReceived <pMessage> |
mouseLeave | Sent when the mouse pointer moves out of an object. | mouseLeave |
socketClosed | Sent when the remote system closes a socket. | socketClosed <pSocketID> |
mouseDoubleUp | Sent when the mouse button is released at the end of a double-click. | mouseDoubleUp <pButtonNumber> |
mouseDoubleDown | Sent when the user double-clicks. | mouseDoubleDown <pButtonNumber> |
Command
Name | Summary | Syntax |
---|---|---|
iphoneSetReachabilityTarget | Starts monitoring a server of reachability via the network. | iphoneSetReachabilityTarget <hostNameOrAddress> |
iphoneSetRedrawInterval | Synchronizes LiveCode redraws with the device's refresh rate. | iphoneSetRedrawInterval <frameInterval> |
mobileAdSetVisible | Specifies whether an ad can be seen or is hidden. | mobileAdSetVisible <ad>, <visible> |
mobileAdSetTopLeft | Sets the topLeft position of an ad. | mobileAdSetTopLeft <adName>, <topLeft> |
Property
Name | Summary | Syntax |
---|---|---|
decorations | Specifies the window controls and appearance of a stack window. | set the decorations of <stack> to {<controlList> | <WDEF> | default | empty} |
zoomBox | Shows a window's zoom box. | set the zoomBox of <stack> to {true | false} |
topRight | Specifies the location of the specified object's upper right corner. | set the topRight of <object> to <right>, <top> |
maxWidth | Specifies how wide a stack window can be made when it's resized. | set the maxWidth of <stack> to <pixels> |
cantDelete | Specifies whether an object can be deleted. | set the cantDelete of {<card> | <group> | <stack>} to {true | false} |
script | Specifies the contents of an object's **script**. | set the script of <object> to <string> |
borderColor | Specifies the color of an object's border. | set the borderColor of <object> to {empty | <colorName> | <RGBColor>} set the borderColor of <line> of <field> to {empty | <colorName> | <RGBColor>} |
minWidth | Specifies how narrow a stack window can be made when it's resized. | set the minWidth of <stack> to <pixels> |
hilitePixel | Specifies which entry in the color table is used for the background color when an object, or text in an object, is highlighted. | set the hilitePixel of <object> to <colorNumber> |
patterns | Specifies all the patterns of an object, in shorthand form. | set the patterns of <object> to <patternsList> |
screen | Returns the screen number that the stack is on. The number corresponds to the line of the rect of the screen returned by the screenrects. | put the screen of <stack> |
compositorCacheLimit | Specifies the maximum number of bytes the engine should use to cache content for the stack. | set the compositorCacheLimit of <stack> to <cacheLimit> |
number | Specifies an object's position within a file, a card's position within a stack, or a control's layer on a card. | set the number of <card> to <number> get the number of <object> |
topLeft | Specifies the location of the specified object's upper left corner. | set the topLeft of <object> to left,top |
altID | Specifies an alternate ID for objects. | set the altID of <object> to <IDNumber> |
right | Specifies how far an object's right edge is from the left edge of the window or screen. | set the right of <object> to <pixels> |
focusPattern | Specifies the pattern used for an object's outline when it has the insertion point or is active focused. | set the focusPattern of <object> to {<patternNumber> | <imageID> | empty} |
topPattern | Specifies the pattern used to draw a three-D object's raised edge. | set the topPattern of <object> to {<patternNumber> | <imageID> | empty} |
foregroundColor | Specifies the color of object text and borders. | set the foregroundColor of <object> to {empty | <colorName> | <RGBColor>} set the foregroundColor of [<chunk> of] <field> to {empty| <colorName> | <RGBColor>} |
password | Specifies a **password** that the user must enter before making changes to the stack. | set the password of <stack> to {<passwordString> | empty} |
startUpIconic | Specifies whether, when a stack opens, it should be iconified or displayed as a window. | set the startupIconic of <stack> to {true | false} |
acceleratedRendering | Specifies whether to use accelerated rendering for this stack | set the acceleratedRendering of <stack> to { true | false } |
documentFilename | Specifies the file path to the file that the stack represents. | set the documentFilename of <stack> to <filename> |
borderPixel | Specifies which entry in the color table is used for the color of an object's border. | set the borderPixel of <object> to <colorNumber> |
shadowPixel | Specifies which entry in the color table is used for the color of an object's drop shadow or the background of a scrollbar. | set the shadowPixel of <object> to <colorNumber> |
recentNames | Reports a list of the most recently visited cards, in reverse order. | get the recentNames [of <stack>] |
behavior | Allows an object to inherit its script handlers from another object. | set the behavior of <object> to {<button> | <stack>} |
passKey | Enters a password for a locked stack, letting the user modify the stack. | set the passKey of <stack> to <passwordString> |
recentCards | Reports the long ID properties of recent cards|recently visited cards. | get the recentCards [of <stack>] |
customProperties | Specifies all the custom properties of an object that are in the current customPropertySet, along with their settings. | set the customProperties of <object> to <propertiesArray> set the customProperties[<propertySet>] of <object> to <propertiesArray> |
shadowColor | Specifies the color of an object's drop shadow or the background of a scrollbar. | set the shadowColor of <object> to {empty | <colorName> | <RGBColor>} |
borderWidth | Specifies the width of an object's border. | set the borderWidth of <object> to <pixelWidth> set the borderWidth of <line> of <field> to <pixelWidth> |
iconic | Specifies whether a stack window is minimized. | set the iconic of <stack> to {true | false} |
formatForPrinting | Specifies whether font layout is done using printer fonts or screen fonts. | set the formatForPrinting of <stack> to {true | false} |
textSize | Specifies the point size of text displayed by an object. | set the textSize of <object> to <pointSize> set the textSize of [<chunk> of] <field> to <pointSize> |
windowManagerPlace | Specifies whether a Unix window manager can automatically place a stack's window when the stack is opened. | set the windowManagerPlace to {true | false} |
shadowOffset | Specifies the size and direction of an object's drop shadow. | set the shadowOffset of <object> to <pixels> |
editMenus | Specifies that the menu bar appears at the top of the stack window. | set the editMenus of <stack> to {true | false} |
textFont | Specifies the font face of text in an object. | set the textFont of <object> to <fontName> [, <language>] set the textFont of [<chunk> of] <field> to <fontName> [, <language>] |
menubar | Specifies the name of a menu bar to use when a stack is frontmost. | set the menubar of <stack> to {<groupname> | empty} |
backgroundColor | Specifies an object's background color. | set the backgroundColor of <object> to {empty | <colorName> | <RGBColor>} set the backgroundColor [of <chunk>] [of <line>] of <field> to {empty| <colorName> | <RGBColor>} |
hiliteColor | Specifies the color of the background when an object, or text in an object, is highlighted. | set the hiliteColor [of <object>] to {empty | <colorName> | <RGBColor>} |
sharedGroupNames | Reports the names of all the shared groups of the card or stack | get the sharedGroupNames of {<card> | <stack>} |
externalCommands | Lists the available external commands for a stack. | get the externalCommands of <stack> |
externalFunctions | Lists the available external functions for a stack. | get the externalFunctions of <stack> |
HCAddressing | Determines whether grouped fields and card buttons are assumed if the field or button's domain is not specified. | set the HCAddressing of <stack> to {true | false} |
windowID | Reports the operating system's ID for a stack window. | get the windowID of <stack> |
cardNames | Lists the short name property of all the cards in a stack, or all the cards that contain a specified group. | get the cardNames of {group | stack} |
compositorTileSize | Specifies the size the fragments of object images it caches should be. | set the compositorTileSize of <stack> to <tileSize> |
compositorType | Specifies which compositor is used when rendering a stack. | set the compositorType of <stack> to <compositorType> |
sharedGroupIds | Reports the ids of all the shared groups of the card or stack | get the sharedGroupIds of {<card> | <stack>} |
windowShape | Specifies an image whose mask is used as the shape of the window. | set the windowShape of stack to {imageID | 0} |
bottomPattern | Specifies the pattern of a three-D object's lowered edge. | set the bottomPattern of <object> to {empty | <patternNumber> | <imageID>} |
customPropertySets | Lists all the custom property sets that can apply to an object. | get the customPropertySets of <object> |
hilitePattern | Specifies the fill pattern used for the background when an object, or text in an object, is highlighted. | set the hilitePattern of <object> to {<patternNumber> | <imageID> | empty} |
visible | Specifies whether an object can be seen or is hidden. | set the [effective] visible of <object> to {true | false} |
shadowPattern | Specifies the pattern of an object's drop shadow. | set the shadowPattern of <object> to {<patternNumber> | <imageID> | empty} |
layer | Specifies the back-to-front order of objects on a card or the order of cards in a stack. | set the layer of <object> to {<layerNumber> | top | bottom} |
backgroundPattern | The **backgroundPattern** specifies the pattern used to draw an object's background. | set the backgroundPattern of <object> to {<patternNumber> | <imageID> | empty} |
backgroundNames | Reports the backgrounds in a stack. | get the backgroundNames of <stack> |
topColor | Specifies the color of a three-D object's raised edge. | set the topColor of <object> to {empty | <colorName> | <RGBColor>} |
maxHeight | Specifies how tall a stack window can be made when it's being resized. | set the maxHeight of <stack> to <pixels> |
HCStack | Reports whether a stack was originally imported from HyperCard. | get the HCStack of <stack> |
bottom | Specifies how far an object's bottom edge is from the top of the window or screen. | set the bottom of <object> to <number> |
scriptOnly | Specifies whether the stack should be saved as script only which does not retain any objects or custom properties | set the scriptOnly of <stack> to { true | false } |
substacks | Specifies which stacks are associated with a main stack, and saved in the same file. | set the substacks of <stack> to <substacksList> |
mainStack | Specifies which main stack a substack belongs to. | set the mainStack of <stack> to <mainStack> |
borderPattern | Specifies the pattern of an object's border. | set the borderPattern of <object> to {empty | <patternNumber> | <imageID>} |
externalPackages | Lists the available external packages for a stack. | get the externalPackages of <stack> |
height | Specifies the distance from an object's top edge to its bottom edge. | set the height of <object> to <numberOfPixels> |
metal | Displays a window with a textured-metal appearance. | set the metal of <stack> to {true | false} |
draggable | Shows a stack's title bar. | set the draggable of <stack> to {true | false} |
minStackFileVersion | Get the minimum stack file version for a stack that will allow it to be safely saved without data loss. | get the minStackFileVersion of <stack> |
freeSize | Always reports zero and is included in LiveCode for compatibility with imported HyperCard stacks. | get the freeSize of <stack> |
bottomPixel | Specifies which entry in the color table is used for the color of a three-D object's lowered edge. | set the bottomPixel of <object> to <colorNumber> |
minimizeBox | Shows a window's minimize box or collapse box. | set the minimizeBox of <stack> to {true | false} |
modifiedMark | Specifies whether the modified indicator dot should be displayed on the close-box of a stack. | set the modifiedMark of <stack> to {true | false} |
pixmapID | Specifies the ID of the data structure the operating system uses to hold the screen image of the current card. | get the pixmapID of <stack> |
resizable | Specifies whether the user can resize a stack window. | set the resizable of <stack> to {true | false} |
dynamicPaths | Specifies whether the message path includes the current card and its owners. | set the dynamicPaths of <stack> to {true | false} |
top | Specifies how far an object's top edge is from the top of the window or screen. | set the top of <object> to <numberOfPixels> |
rectangle | Specifies the area within which an object is drawn. | set the rectangle of <object> to <left>, <top>, <right>, <bottom> get the [effective] rectangle of <object> |
unicodeTitle | Specifies the string shown in a stack window's title bar as a unicode string. | set the unicodeTitle of stack to titleString |
invisible | Specifies whether an object is hidden. | set the invisible of <object> to {true | false} get the [effective] invisible of <object> |
topPixel | Specifies which entry in the color table is used for the color of a three-D object's raised edge. | set the topPixel of <object> to <colorNumber> |
cantAbort | Specifies whether the user can halt a handler with a key combination. | set the cantAbort of <stack> to {true | false} |
bottomRight | Specifies the location of the specified object's lower right corner. | set the bottomRight of <object> to right,bottom |
foregroundPixel | Specifies which entry in the color table is used for an object's text and borders. | set the foregroundPixel of <object> to <colorNumber> |
bottomLeft | Specifies the location of the specified object's lower left corner. | set the bottomLeft of <object> to <left>, <bottom> |
charSet | Indicates whether the Macintosh or ISO 8859 character set was used to enter a stack's text. | get the charSet of <stack> |
cardIDs | Reports the cards in a stack or the cards that a specified group appears on. | get the cardIDs of {group | stack} |
label | Specifies the string shown in a stack window's title bar, or a text label to be displayed on the specified object if its showName property is true. | set the label of <object> to <labelString> |
location | Specifies where an object is. | set the location of <object> to <point> |
externals | Specifies a list of files containing external code that are to be loaded into memory when the stack opens. | set the externals of <stack> to <filePathsList> |
stackFiles | Specifies a list of stacks and their file names, to be used when a stack that's not open is referenced in a handler. | set the stackFiles of <stack> to <stackFileList> |
left | Specifies how far an object's left edge is from the left edge of the window or screen. | set the left of <object> to <numberOfPixels> |
showFocusBorder | Displays a border around the active control. | set the showFocusBorder of <control> to {true | false} |
liveResizing | Causes a stack window to display its contents changing during resizing, instead of redrawing the contents after the window is resized. | set the liveResizing of <stack> to {true | false} |
filename of stack | Reports the file path of the file a stack is stored in. | set the filename of <stack> to <filePath> |
cantModify | Specifies whether the user can make changes to a stack. | set the cantModify of <stack> to { true | false } |
destroyWindow | Specifies whether the memory used by a stack window is purged when the stack is closed. | set the destroyWindow of <stack> to {true | false} |
systemWindow | Makes a window float above all running applications. | set the systemWindow of <stack> to {true | false} |
selected | Specifies whether an object is **selected**. | set the selected of <object> to {true | false} |
properties | Specifies some of an object's **properties** and their current values. | set the properties of <object> to <propertiesArray> |
colors | Specifies all the colors of an object, in shorthand form. | set the colors of <object> to <colorsList> |
ID | Reports the unique ID number assigned to an object. | set the ID of {image | stack} to <number> get the [{ long | abbreviated | short }] ID of <object> |
mode | Reports the type of window a stack is displayed in. | get the mode of <stack> |
customPropertySet | Specifies a set of custom properties applied to an object. | set the customPropertySet of object to {setName | empty} |
backgroundPixel | Specifies which entry in the color table is used for an object's background color. | set the backgroundPixel of <object> to <colorNumber> |
currentCard | The short name of the current card of a stack | get the currentCard of <stack> set the currentCard of <stack> to <cardName> |
destroyStack | Specifies whether a stack is purged from memory when it's closed, or whether it remains in memory. | set the destroyStack of <stack> to {true | false} |
fullscreen | Specifies whether a stack window takes up the entire screen. | set the fullscreen of <stack> to { true | false } |
focusPixel | Specifies which entry in the color table is used for the color of an object's outline when it has the insertion point or is active focused. | set the focusPixel of <object> to <colorNumber> |
bottomColor | Specifies the color of a three-D object's lowered edge. | set the bottomColor of <object> to {empty | <colorName> | <RGBColor>} |
textStyle | Specifies the style or styles applied to text in an object. | set the textStyle of <object> to {empty | plain | <stylesList>} set the textStyle of [<chunk> of] <field> to {empty | plain | <stylesList>} set the textStyle[<style>] of object to {true | false} |
minHeight | Specifies how short a stack window can be made when it's resized. | set the minHeight of <stack> to <pixels> |
threeD | Specifies whether an object appears to stick out of or recede into the screen. | set the threeD of <object> to {true | false} |
width | The **width** of an object is the distance from its left edge to its right edge. | set the width of <object> to <numberOfPixels> |
showBorder | Specifies whether an outline is drawn around an object. | set the showBorder of <object> to {true | false} |
name | Specifies the name of an object. | set the [{ long | abbreviated | short }] name of <object> to <string> get the name |
closeBox | Shows a window's close box. | set the closeBox of <stack> to {true | false} |
owner | Reports which object is next in the object hierarchy. | get the [{ long | abbreviated | short }] owner of <object> |
focusColor | Specifies the color of the outline around the active control or the field with the insertion point. | set the focusColor of <object> to {empty | <colorName> | <RGBColor>} |
customKeys | Lists the names of all the custom properties of an object. | set the customKeys of <object> to {<propertiesList> | empty} |
editBackground | Specifies that any objects created should be added to the background. | set the editBackground of <stack> to {true | false} |
foregroundPattern | Specifies the pattern used for object text and borders. | set the foregroundPattern of <object> to {<patternNumber> | <imageID> | empty} set the foregroundPattern of [<chunk> of] <field> to {<patternNumber> | <imageID> | empty} |
backgroundIDs | Reports the backgrounds in a stack. | get the backgroundIDs of <stack> |